<template>
	<!-- 采购需求下发 -->
	<div>
		<v-card>
			<v-data-table small fixed-header dense :headers="masterOrderHeaderList" :items="masterOrderList"
				item-key="id" class="text-no-wrap" show-select :single-select="true" show-expand single-expand
				loading-text="正在加载请稍等......" :loading="masterOrderLoading" :options.sync="masterOrderOptions"
				:footer-props="vuetifyDefaultPage" :server-items-length="masterOrderTotalCount"
				@item-expanded="expandedMasterOrderItemEvent">
				<template v-slot:top>
					<v-toolbar flat>
						<v-toolbar-title>采购需求下发</v-toolbar-title>
						<!-- 一根竖线 -->
						<v-divider class="mx-4" inset vertical></v-divider>
						<v-row class="mt-2">
							<v-col cols="12" sm="3" md="2">
								<v-text-field label="工单号" v-model="query.code" dense outlined>
								</v-text-field>
							</v-col>
							<v-col cols="12" sm="3" md="2">
								<v-text-field label="项目号" v-model="query.projectcode" dense outlined>
								</v-text-field>
							</v-col>
							<v-col cols="12" sm="3" md="2">
								<v-text-field label="项目名称" v-model="query.projectname" dense outlined>
								</v-text-field>
							</v-col>
							<v-col cols="12" sm="2" md="2">
								<v-text-field label="设备名称" v-model="query.name" dense outlined>
								</v-text-field>
							</v-col>
							<!-- ml-n16 前面加n是间距 -->
							<!-- class="ml-n16 mx-auto" -->
							<v-col cols="12" sm="2" md="2">
								<v-btn depressed color="primary" @click="searchMasterOrders">查询</v-btn>
							</v-col>
						</v-row>
					</v-toolbar>
				</template>
				<template v-slot:item.actions="{ item }">
					<div>
						<v-btn v-if="item.status==120" small tile color="deep-orange"
							@click="openMachineChangeMasterDialog(item)">
							设变工单
						</v-btn>
					</div>
				</template>
		</v-data-table>
		</v-card>
	</div>
</template>

<script>
</script>

<style>
</style>
